package com.wxq.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wxq.common.utils.PageUtils;
import com.wxq.product.entity.CategoryEntity;
import com.wxq.product.vo.Catalog2VO;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author jim
 * @email 2982877319@qq.com
 * @date 2022-03-13 19:57:58
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    List<CategoryEntity> listWithTree();

    Long[] findCategoryPath(Long catelogId);

    void updateCascade(CategoryEntity category);

    /**
     * 商城首页一级分类
     * @return
     */
    List<CategoryEntity> getLevel1Categories();
    /**
     * 组装分类数据
     *
     * @return
     */
    Map<String, List<Catalog2VO>> getCatalogJson();
}

